﻿using System;
using System.ServiceModel;
using Domain;
using Ninject.Core;
using WcfPOXCommunication;

namespace TestServer
{
    class Program
    {
        static void Main(string[] args)
        {
            IoCFactory.AddModule(new DefaultModule());

            var serviceHost = new ServiceHost(typeof(ServiceFacade), new Uri[] { });
            var binding = new WSHttpBinding(SecurityMode.None);
            Console.WriteLine(string.Format("SOAP Version: {0}", binding.EnvelopeVersion));
            serviceHost.AddServiceEndpoint(typeof(IServiceFacade),
                                           binding,
                                           "http://trentcioranpc:54321/ServiceFacade");
            serviceHost.Open();

            Console.ReadKey();
            serviceHost.Close();
        }
    }

    public class DefaultModule: StandardModule
    {
        public override void Load()
        {
            Bind<IClientService>().To<ClientService>();
        }
    }
}
